﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Presentacion/Site.Master" AutoEventWireup="true" CodeBehind="ComposicionUP.aspx.cs" Inherits="Gisena.Presentacion.UP.ComposicionUP" %>
   <%@ Import Namespace="System.Collections.Generic"%>

<%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">


    
<html>

<body>
 

    <ext:ResourceManager runat="server" />
    
    
  
    
    <ext:FormPanel 
        ID="FormPanPrinc" 
        runat="server"
        Title="COMPOSICIÓN DE LA UNIDAD PRODUCTIVA"
        Width="700" 
        Height="500"        
        BodyPadding="10"
        DefaultAnchor="100%"
         Layout="AutoLayout"
        UI="Success">

      <%--Form Panel Principal  --%>
                

        <Items>
            
            <ext:FieldContainer 
                runat="server" 
                MsgTarget="Side"
                CombineErrors="true"
                FieldLabel="Codigo Up"
                Layout="HBoxLayout">
                  <Items>
                        <ext:NumberField   ID="Txt_Cod_Up" runat="server" MaxLeng="20"  AllowBlank="false" Width="150" />
                          <ext:Toolbar     runat="server"       Flex="1"     Flat="true">   
                        <Items>
                            <ext:Button ID="Button7" runat="server" Text="Buscar..." Icon="Zoom" >
                                   <DirectEvents>
                                   <Click OnEvent="Btn_BuscarUP_Click">
                                   <EventMask ShowMask="true" Msg="Buscando..." MinDelay="500" />
                                  </Click>
                           </DirectEvents>
                         </ext:Button>
                            
                        </Items>
                    </ext:Toolbar>
                  </Items>

                  </ext:FieldContainer>

        </Items>


            <Items>

         <%--Contenedor datos basicos de la up sofia  --%>

            <ext:FieldSet 
                runat="server"
                Title="Detalle de la Up"
                DefaultAnchor="100%">
                <Defaults>
                    <ext:Parameter Name="labelWidth" Value="89" Mode="Raw" />
                </Defaults>
                <Items>
               
                      

                     <ext:FieldContainer 
                runat="server" 
                FieldLabel="Nombre Up" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:TextField ID ="Txt_Nomb_UP2" runat="server" Width="250" Margins="0 3 0 0" ReadOnly="true"/>                    
                </Items>
            </ext:FieldContainer>

                 


                    <%-- Numero de actas sofia plus al registro ya seleccionado --%>

                <ext:FieldContainer 
                runat="server" 
                FieldLabel="Cod. Centro" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                      
                      <ext:TextField ID="Txt_Cod_Cent_Form2" runat="server" Width="250" Margins="0 3 0 0" ReadOnly="true"/>                  
                </Items>
            </ext:FieldContainer>


             <%-- Numero de la ficha --%>

                <ext:FieldContainer 
                runat="server" 
                FieldLabel="No. Ficha" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:TextField   ID="Txt_NFicha_UP2" runat="server" Width="250" Margins="0 3 0 0" ReadOnly="true"/>                    
                </Items>
            </ext:FieldContainer>

   
                              
                           

                </Items>




            </ext:FieldSet>
        </Items>





        <Items>
               <ext:TabPanel runat="server" ID="tabpanelcompos" Width="300" Height="420" disabled="false" AutoScroll="true" >
        <Items>
            
                      
             <%--panel de asesores--%>

            <ext:Panel 
                runat="server" 
                Title="Asesores" 
                BodyPadding="6" AutoScroll="true">

                  <Items>  
             <ext:Toolbar     runat="server"       Flex="1"     Flat="true">   
                       
                        <Items>
                            <ext:Button ID="Btn_Registrar_Ases" runat="server" Text="Guardar" Icon="Add" >
                                   <DirectEvents>
                                   <Click OnEvent="Btn_Registrar_Asesor">
                                  </Click>
                           </DirectEvents>
                         </ext:Button>
                            
                        </Items>
                        </ext:Toolbar>

     </Items> 
               
               <Items>

                    <ext:GridPanel
                    runat="server" 
                    Header="false"
                    Border="false">                         
                    <Store>
                        <ext:Store ID="Store4" runat="server" PageSize="10">
                            <Model>
                                <ext:Model runat="server" IDProperty="ID">
                                    <Fields>
                                        <ext:ModelField Name="Identificacion" Type="Int" />
                                        <ext:ModelField Name="Nombre" Type="String" />
                                        <ext:ModelField Name="Tp_Doc" Type="String" />
                                        <ext:ModelField Name="Correo" Type="String" />
                                        <ext:ModelField Name="Celular" Type="String" />
                                        
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel runat="server">
                        <Columns>
                            <ext:Column runat="server" 
                                Text="Identificacion" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="ID" 
                                />
                            <ext:Column runat="server" 
                                Text="Nombre" 
                                Sortable="true" 
                                DataIndex="Name"
                                Flex="1" 
                                />
                            <ext:DateColumn runat="server" 
                                Text="Tp_Doc" 
                                Sortable="true" 
                                DataIndex="Name"
                                Flex="1" 
                                />
                            <ext:DateColumn runat="server" 
                                Text="Correo" 
                                Sortable="true" 
                                DataIndex="Name"
                                Flex="1" 
                                />
                            <ext:Column runat="server" 
                                Text="Celular" 
                                Sortable="true" 
                                DataIndex="Name"
                                Flex="1" >
                                <Renderer Handler="return (value) ? 'Yes':'No';" />
                            </ext:Column>
                        </Columns>
                    </ColumnModel>
                    <View>
                        <ext:GridView runat="server" LoadMask="false" />
                    </View>
                    <Features>
                        <ext:GridFilters runat="server" Local="true">
                            <Filters>
                                <ext:NumericFilter DataIndex="ID" />
                                <ext:StringFilter DataIndex="Name" />
                                <ext:DateFilter DataIndex="Start">
                                    <DatePickerOptions runat="server" TodayText="Now" />
                                </ext:DateFilter>
                                <ext:DateFilter DataIndex="End">
                                    <DatePickerOptions runat="server" TodayText="Now" />
                                </ext:DateFilter>                        
                                <ext:BooleanFilter DataIndex="Completed" />
                            </Filters>
                        </ext:GridFilters>
                    </Features>
                    <BottomBar>
                        <ext:PagingToolbar 
                            runat="server" 
                            DisplayInfo="true"
                            DisplayMsg="Displaying Jobs {0} - {1} of {2}"
                            />
                    </BottomBar>
                </ext:GridPanel>


                 </Items>

                  
              
            </ext:Panel>

            <%--panel de socios --%>
        <ext:Panel
                runat="server" 
                Title="Socios" 
                BodyPadding="6" AutoScroll="true">
             <Listeners>
                            <Activate Handler="#{DirectMethods}.ActivarPanelSocios();" />
                 </Listeners>
                <Content>
                 


                    <ext:FieldSet 
                runat="server"
                Title="Registrar Socios a la Unidad Productiva"
                Collapsible="true"
                DefaultAnchor="100%">


                 <Items>
                 <ext:FieldContainer 
                runat="server" 
                MsgTarget="Side"
                CombineErrors="true"
                FieldLabel="Identificacion"
                Layout="HBoxLayout" ID="FieldContainer1">
                  <Items>
                        <ext:NumberField   ID="Txt_Ident_Socio" runat="server" MaxLeng="20"  AllowBlank="false" Width="150" ReadOnly="False"/>
                     
                          <ext:Toolbar     runat="server"       Flex="1"     Flat="true" ID="Toolbar2">   
                       
                        <Items>
                            <ext:Button ID="Btn_BuscarSocio" runat="server" Text="Buscar" Icon="ZoomOut">
                                     <DirectEvents>
                                   <Click OnEvent="Buscar_Socios">
                                    </Click>
                                 </DirectEvents> 
                         </ext:Button>

                            <ext:Button ID="Btn_RegistrarSocio" runat="server" Text="Registrar" Icon="Add">
                                     <DirectEvents>
                                   <Click OnEvent="Btn_Registrar_Socio">
                                    </Click>
                                 </DirectEvents> 
                         </ext:Button>
                                
                            
                        </Items>

                                
                            


                    </ext:Toolbar>
                  </Items>
                  </ext:FieldContainer>



                <ext:FieldContainer 
                runat="server" 
                FieldLabel="Nombre" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                      <ext:TextField ID="txt_Nombre_Spcio" runat="server" Width="250" Margins="0 3 0 0" ReadOnly="true"/>                  
                </Items>        
                </ext:FieldContainer>


              </Items>
                   
                
                     
   
                        
         <%--Boton Guardar Socios --%>
   

 <Items>
 
                    
                    <ext:GridPanel
                    runat="server" 
                    Header="false"
                    Border="false"
                        ID="GridAsesores">                         
                    <Store>
                        <ext:Store ID="StrlistaSocios" runat="server" PageSize="10">
                            <Model>
                                <ext:Model runat="server" IDProperty="ID">
                                    <Fields>
                                        <ext:ModelField Name="Ident" Type="String" />
                                        <ext:ModelField Name="Nombre" Type="String" />
                                        <ext:ModelField Name="apellido" Type="String" />
                                        <ext:ModelField Name="tipodocumento" Type="String" />                                          
                                          <ext:ModelField Name="ficha" Type="String" />
                                         <ext:ModelField Name="tipoblacion" Type="String" />
                                        
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel runat="server">
                        <Columns>
                            <ext:Column runat="server" 
                                Text="Ident" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="Ident" 
                                />
                            <ext:Column runat="server" 
                                Text="Nombre" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="Nombre"
                                Flex="1" 
                                />
                            <ext:Column runat="server" 
                                Text="Apellido" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="apellido"
                                Flex="1" 
                                />
                            <ext:Column runat="server" 
                                Text="tipodocumento" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="tipodocumento"
                                Flex="1" 
                                />
                            
                             <ext:Column runat="server" 
                                Text="ficha" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="ficha"
                                Flex="1" >
                                
                            </ext:Column>
                             <ext:Column runat="server" 
                                Text="tipoblacion" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="tipoblacion"
                                Flex="1" >
                                
                            </ext:Column>
                        </Columns>
                    </ColumnModel>
                           <SelectionModel>
                <ext:CellSelectionModel runat="server">
                    <DirectEvents>
                        <Select OnEvent="Cell_Click" />                        
                    </DirectEvents>
                </ext:CellSelectionModel>
            </SelectionModel>
                    <View>
                        <ext:GridView runat="server" LoadMask="false" />
                    </View>
                    <Features>
                        <ext:GridFilters runat="server" Local="true">
                            <Filters>
                                <ext:NumericFilter DataIndex="ID" />
                                <ext:StringFilter DataIndex="Name" />
                                <ext:DateFilter DataIndex="Start">
                                    <DatePickerOptions runat="server" TodayText="Now" />
                                </ext:DateFilter>
                                <ext:DateFilter DataIndex="End">
                                    <DatePickerOptions runat="server" TodayText="Now" />
                                </ext:DateFilter>                        
                                <ext:BooleanFilter DataIndex="Completed" />
                            </Filters>
                        </ext:GridFilters>
                    </Features>
                    <BottomBar>
                        <ext:PagingToolbar 
                            runat="server" 
                            DisplayInfo="true"
                            DisplayMsg="Displaying Jobs {0} - {1} of {2}"
                            />
                    </BottomBar>
                </ext:GridPanel> 
              </Items>

                        </ext:FieldSet>

                </Content>
            </ext:Panel>

             </Items>
    </ext:TabPanel>
        </Items>

        


       


        
        
</ext:FormPanel>

   


</body>
</html>


</asp:Content>
